<?php if($this->errMsg) :?>
	<?php $this->showError($this->errMsg)?>
<?php endif; ?>
<?php if($this->msg) :?>		
	<?php $this->showMessage($this->msg)?>	
<?php endif;?>
<form name='form' id='form' action="" method="POST">
	<div class="title_ad"><label><a href="">Add Group</a></label>
	<a style="text-align:right;float:right;margin-right:20px;" href=""><img src="<?php echo $this->baseUrl()?>/application/templates/admin/images/plus_32.png" /></a></div>
	<div class="mydiv">
	<table  class="tb_box">
	
		<tr>
			<td width="130">
				<label>Tên Group</label>
			</td>			
			<td>						
				<input type="text" name='name' value="" class='name' />
				<p class='error'></p>
			</td>	
				
		</tr>				
	</table>
	<div class='div_button' >	
		<input type="submit" value="Thêm" class='button1'/>
		<input type="reset" value="Làm lại" class='button2' />
	</div>	
	</div>
</form>
<script>
$(document).ready(function(){
	$('.button1').click(function(){
		$('.error').html('');
		if($('.name').val()=="")
		{
			$(".error").append("<label class='error' >Tên Group không được để trống</label>");
			$('.name').focus();
			return false;
		}	
		else if($('.name').val().length < 5 )
		{
			$(".error").append("<label class='error' >Tên Group phải lớn hơn 4 kí tự</label>");
			$('.name').focus();
			return false;
		}
		
		else return true;	
		
	});
});
</script>